package com.wing.bill.model.enums;

import lombok.Getter;

@Getter
public enum SignOrderStatusEnum {
    REVOKED("0","待受理"),
    WAITING_TO_SIGN("1", "待签收"),
    SIGN("2","已拒绝"),
    WAREHOUSING("3","已入库"),
    SIGNIN("4","已签收"),
    ;


    private final String code;
    private final String desc;

    SignOrderStatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(String source) {
        for (SignOrderStatusEnum value : SignOrderStatusEnum.values()) {
            if (value.code.equals(source)) {
                return value.desc;
            }
        }
        return null;
    }
}
